﻿using Model;
using System;

namespace Observer
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Supervision" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select Supervision.svc or Supervision.svc.cs at the Solution Explorer and start debugging.
    public class Supervision : ISupervision
    {
        //TODO: do something with alerts( for example write to db) Data storage module
        public void Alert(InvasionAlert alert)
        {
            Mailing.Alert(alert);
        }

        public void RegisterPalace(String palaceName)
        {
            Mailing.NotifyNewPalace(new Palace { Name = palaceName });
        }

        public void RegisterActivity(PalaceActivity activity)
        {
            Mailing.NotifyActivity(activity);
        }

        public void RemovePalace(String palaceName)
        {
            Mailing.NotifyPalaceRemove(new Palace { Name = palaceName });
        }

    }
}
